package com.ruoyi.boss.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.boss.mapper.TSendInterverMapper;
import com.ruoyi.boss.domain.TSendInterver;
import com.ruoyi.boss.service.ITSendInterverService;

/**
 * 特殊时段Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class TSendInterverServiceImpl implements ITSendInterverService 
{
    @Autowired
    private TSendInterverMapper tSendInterverMapper;

    /**
     * 查询特殊时段
     * 
     * @param sendInterverId 特殊时段主键
     * @return 特殊时段
     */
    @Override
    public TSendInterver selectTSendInterverBySendInterverId(Long sendInterverId)
    {
        return tSendInterverMapper.selectTSendInterverBySendInterverId(sendInterverId);
    }

    /**
     * 查询特殊时段列表
     * 
     * @param tSendInterver 特殊时段
     * @return 特殊时段
     */
    @Override
    public List<TSendInterver> selectTSendInterverList(TSendInterver tSendInterver)
    {
        return tSendInterverMapper.selectTSendInterverList(tSendInterver);
    }

    /**
     * 新增特殊时段
     * 
     * @param tSendInterver 特殊时段
     * @return 结果
     */
    @Override
    public int insertTSendInterver(TSendInterver tSendInterver)
    {
        return tSendInterverMapper.insertTSendInterver(tSendInterver);
    }

    /**
     * 修改特殊时段
     * 
     * @param tSendInterver 特殊时段
     * @return 结果
     */
    @Override
    public int updateTSendInterver(TSendInterver tSendInterver)
    {
        tSendInterver.setUpdateTime(DateUtils.getNowDate());
        return tSendInterverMapper.updateTSendInterver(tSendInterver);
    }

    /**
     * 批量删除特殊时段
     * 
     * @param sendInterverIds 需要删除的特殊时段主键
     * @return 结果
     */
    @Override
    public int deleteTSendInterverBySendInterverIds(Long[] sendInterverIds)
    {
        return tSendInterverMapper.deleteTSendInterverBySendInterverIds(sendInterverIds);
    }

    /**
     * 删除特殊时段信息
     * 
     * @param sendInterverId 特殊时段主键
     * @return 结果
     */
    @Override
    public int deleteTSendInterverBySendInterverId(Long sendInterverId)
    {
        return tSendInterverMapper.deleteTSendInterverBySendInterverId(sendInterverId);
    }
}
